from  peewee import *
from  db_pool import *

settings = {'host': 'ooo.dgpms.cn', 'password': 'gcmc@0769', 'port': 3306, 'user': 'bid'}
db = MySQLDatabase("bid",**settings)
 
 # _*_ coding:utf-8 _*_
 
from playhouse.pool import PooledMySQLDatabase
from playhouse.shortcuts import ReconnectMixin

 
class Person(BaseModel):
    name = CharField()
    birthday = DateField()
 
    # class Meta:
    #     database = db 

with db.connection_context():
    db.connect(reuse_if_open=True)
    db.create_tables([Person])
